﻿using System.Web;
using StructureMap;

namespace TimeTracker.Core.Services.Implementation
{
    [Pluggable("Default")]
    public class RedirectorService : IRedirectorService
    {
        public void IdiNaAdminStranu()
        {
            Redirect("~/Admin/GlavnaPloca.aspx");
        }

        public void IdiNaStranuPristupZabranjen()
        {
            Redirect("~/Admin/PristupZabranjen.aspx");
        }

        public void IdiNaStranuGreske()
        {
            Redirect("~/Error.aspx");
        }

        public void IdiNaStranuPrijave()
        {
            Redirect("~/Account/Prijava.aspx");
        }

        private static void Redirect(string path)
        {
            HttpContext.Current.Response.Redirect(path);
        }

    }
}
